package com.shishi.fast.common.vo;

/**
 * 类描述：枚举了一些常用API操作码
 * Created by liuhaifeng on 2022/3/17.
 */
public enum ResultCode implements IErrorCode {
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),

    INQUIRY(301, "是否继续执行"),

    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(402, "没有权限,请联系管理员授权"),
    VALIDATE_FAILED(403, "参数检验失败"),
    PATH_NOT_FOUND(404, "接口未找到"),
    CAN_NOT_FIND_RECORD(405, "资源未找到");
    private Integer code;
    private String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
